//
//  BlindDeviceRequest.m
//  TestGizWits
//
//  Created by JM on 15/11/18.
//  Copyright © 2015年 JM. All rights reserved.
//

#import "BlindDeviceRequest.h"

@implementation BlindDeviceRequest

- (void)didRealRequest {
    //需要开发者自行把 uid 和 token 换成实际的值//虚拟设备，我passCode我 写123456 才能过以后换换别的试试
    [[XPGWifiSDK sharedInstance] bindDeviceWithUid:self.DY_uid   token:self.DY_token did:self.DY_did passCode:self.DY_passCode remark:nil];

}

//
//- (void)XPGWifiSDK:(XPGWifiSDK *)wifiSDK didUpdateProduct:(NSString *)product result:(int)result
//{
//    if([product isEqualToString:self.DY_productKey])
//    {
//        self.block(nil,[NSError dy_errorWithErrCode:-999 errMessage:@"更新设备不匹配"]);
//    }
//    if(result == XPGWifiError_NONE) {
//        updateDeviceCMDDicResponse* response = [updateDeviceCMDDicResponse response];
//        response.DY_wifiSDK = wifiSDK;
//        self.block(response,nil);
//    }
//    else
//    {
//        self.block(nil,[NSError dy_errorWithErrCode:result]);
//    }
//    [super superHandelResponse];
//}
//
//绑定事件
- (void)XPGWifiSDK:(XPGWifiSDK *)wifiSDK didBindDevice:(NSString *)did error:(NSNumber *)error errorMessage:(NSString *)errorMessage {
    if([error intValue] == XPGWifiError_NONE)
    {
        NSLog(@"绑定成功");
        //绑定成功
    }
    else
    {
        NSLog(@"绑定失败:%@:%@",error,errorMessage);
        //绑定失败
    }
}


@end

@implementation BlindDeviceResponse

@end